vb.net and mysql connectivity [closed]

Posted by kalpana on Programmers See other posts from Programmers or by kalpana
Published on 2012-05-29T11:47:40Z Indexed on 2012/06/01 4:48 UTC
Read the original article Hit count: 417

Filed under:
|
|

I have used adodb using odbc database connectivity for connecting vb.net to mysql. I have fetched table values into recordset. I want to fetch only one column values (for example, table name-login, column name-password and values in password column are "manage","sales","general"). I want to fetch these values in text boxes.

I have written code but it's not working.

Dim conn As New ADODB.Connection
    Dim res As New ADODB.Recordset
conn.Open("test", "root", "root")
        res = conn.Execute("select password from login")

textbox1.text=res(0).value
textbox2.text=res(1).value
textbox3.text=res(2).value

I am getting data in textbox1 but other data is not getting inserted into textbox2 and textbox3..I am getting error i.e (1) Item cannot be found in the collection corresponding to the requested name or ordinal.

© Programmers or respective owner

Related posts about database

Related posts about mysql